package User;

import book.bookList;
import operation.*;

import java.util.Scanner;

public class administorUser extends User{
    public administorUser(String name) {
        super(name);
        operation=new Listoperation[]{new exitoperation()
                ,new FIndoperation(),
                new Addoperation(),
                new Deletoperation(),
                new Showoperation()};
    }
    public int menu(){
        System.out.println("欢迎"+name+"来到图书管理系统");
        System.out.println("1.查找图书");
        System.out.println("2.新增图书");
        System.out.println("3.删除图书");
        System.out.println("4.显示图书");
        System.out.println("0,退出系统");
        Scanner scanner =new Scanner(System.in);
        System.out.println("请输入你的操作:");
        int x=scanner.nextInt();
        return x;
    }
    public void dooperation(int choice, bookList booklist) {
        operation[choice].work(booklist);
    }
}
